package org.yoao.crm.tools;

import java.util.Vector;

/**
 * @author yxwonline.com
 * @description 
 * @date 2010-8-5 上午12:13:56
 */
public class PubFunction {
	public static String getUTF(String str){
		try{
			String temp_p = str;
			byte[] temp_t = temp_p.getBytes("ISO8859-1");
			String temp = new String(temp_t);
			return temp;
		}catch(Exception e){
			e.printStackTrace();
		}
		return "";
	}
	
	public static Vector splitString(String sign, String sourceString){
		Vector splitArrays = new Vector();
	    int i = 0;
	    int j = 0;
	    if (sourceString.length() == 0) return splitArrays;
	    while (i <= sourceString.length()){
	    	j = sourceString.indexOf(sign, i);
	        if(j < 0) j = sourceString.length();
	        splitArrays.addElement(sourceString.substring(i, j));
	        i = j + 1;
	    }
	    return splitArrays;
	}
}
